package com.yizhuoyan.his.ao;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 要录入角色的信息
 * @author 300S
 *
 */
@Data
public class RoleAddAo {
	@NotBlank(message = "功能代号不能为空")
	@Length(min = 5,max = 16,message = "代号长度必须在{min}-{max}之间")
	@Pattern(regexp = "[\\w]+",message = "代号只能是数字字母下划线")
	private String code;
	@NotBlank(message = "名字不能为空")
	@Length(min = 2,max = 16,message = "名字长度必须在{min}-{max}之间")
	@Pattern(regexp = "[\u4e00-\u9fa5\\w]+",message = "名字只能是中文")
	private String name;
	@Length(max = 512,message = "备注长度不能超过{max}")
	private String remark;
}
